
import 'package:flutter_ble_ota/ota_callbck.dart';

import 'flutter_ble_ota_platform_interface.dart';

class FlutterBleOta {
  Future<String?> getPlatformVersion() {
    return FlutterBleOtaPlatform.instance.getPlatformVersion();
  }

  Future<bool> initOTA() async {
    return await FlutterBleOtaPlatform.instance.initOTA();
  }

  Future<bool> connect(String address) async {
    return await FlutterBleOtaPlatform.instance.connect(address);
  }

  Future<bool> startOTA(String filePath,{BleOtaCallback? callback}) async {
    return await FlutterBleOtaPlatform.instance.startOTA(filePath,callback: callback);
  }

  Future<bool> dispose() async {
    return await FlutterBleOtaPlatform.instance.dispose();
  }
}
